-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow App Launch When Offline or Unable to Connect to Node-RED #1455
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loads a minimal vue app on loading error to display error and present options to user
Fix Spelling
Caches Node-RED Dashboard Default theme on config received. Theme will be retrieved from cache on subsequent app launches for use when loading or disconnected (to show error messages)
cgjgh
force-pushed
the
Loading-Error-Page
branch
from
November 10, 2024 02:51
4a4a037
to
5d3cb54
Compare
joepavitt
requested changes
Nov 11, 2024
Co-authored-by: Joe Pavitt <[email protected]>
Co-authored-by: Joe Pavitt <[email protected]>
…d-dashboard into Loading-Error-Page
cgjgh
commented
Nov 11, 2024
joepavitt
approved these changes
Nov 12, 2024
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When launching the app while the device is offline or unable to connect to the Node-RED server (due to server-side issues), users currently encounter a blank screen that cannot be navigated past without reloading (if available) or relaunching the app. This persists even if the Internet connection has been restored or the server is functioning correctly again.
This PR addresses such issues by continuing to load a minimal Vue app (fallback app) instead of aborting the app load, which currently results in blank screens. The fallback app can display relevant information and provide options to the user, such as manually reloading the page (a feature absent in PWA on iOS) or opening the email client to send a message to the server admin (for server-related issues). The fallback app is also available offline. Once loaded, if it detects browser is offline, it registers an event listener to detect when the browser comes back online, at which point it reloads and retries loading the full Dashboard 2 app.
Video.1.mp4
Furthermore, this PR includes the ability to provide configurable theming from the Node-RED editor to the fallback app and the loading splash screen. This is achieved by caching the theme to local storage upon successful connections and subsequently loading it from the cache at launch. The cached theme is then used as a fallback theme on connection failures, as user-configured themes are only available upon successful connection.
Related Issue(s)
Checklist
flowforge.yml
?FlowFuse/helm
to update ConfigMap TemplateFlowFuse/CloudProject
to update values for Staging/ProductionLabels
area:migration
label